<!DOCTYPE html>
<html>
<head>
    <script src="/js/plugins/echarts/echarts.common.min.js"></script>
</head>
<body>

<div id="main" style="width: 1700px;height:800px;">

</div>
<script>
    var app = {};

    var chartDom = document.getElementById('main');
    var myChart = echarts.init(chartDom);
    var option;

    option = {
        legend: {},
        tooltip: {},
        dataset: {
            source: [
                ['分组类型', '总金额', '实际金额', '优惠金额'],
                <#list pageResult.list as p>
                 ['${p.allName}',${p.totalAmount},${p.totalAmount},${p.discountAmount}],
                </#list>
            ]
        },
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'}
        ]
    };
    option && myChart.setOption(option);
</script>
</body>
</html>